<template>
	<view class="all">
		<view class="top" :style="{
					'background-image': $img('https://s4.ax1x.com/2022/01/26/7L6gdP.png'),
		}">
			<my-tab ></my-tab>
		</view>
		<view class="ziliao">
			<view class="ziliao_1">
				教育前瞻课程课程课程资料
			</view>
			<view class="ziliao_2">
				<view class="ziliao_2_1">
					<image src="https://s4.ax1x.com/2022/01/26/7LRc6g.png" />
					<text>1000</text>
				</view>
				<view class="ziliao_2_2">
					1256人购买
				</view>
			</view>
		</view>
		<view class="jiange" />
		<view class="xq">
			<view class="xq_1">
				<my-text text='详情' width='70rpx'></my-text>
			</view>
			<view class="img" :style="{
				'background-image':$img('https://s4.ax1x.com/2022/01/26/7LhZSf.png')
			}">

				<view class="button" @click="show=true">
					兑换
				</view>
			</view>
		</view>
		<!-- //遮罩 -->
		<u-popup v-model="show" mode="bottom" border-radius="30" :mask-close-able='false'>
			<view class="popup ">
				<view style="padding: 40rpx 30rpx 30rpx 30rpx;">
					<view class="popup_1">
						积分兑换
					</view>
					<view class="popup_2">
						<view class="popup2_1">
							已选择
						</view>
						<view class="popup2_2">
							<view class="popup2_3">
								<image src="https://s4.ax1x.com/2022/01/26/7LLPvn.png" />
							</view>
							<view class="popup2_4">
								<view class="popup2_4_1">教育前瞻课程课程课程...</view>
								<view class="popup2_4_2">
									<image src="../../../static/img/jq.png" mode=""></image>
									<text>1000</text>
								</view>
							</view>
						</view>
					</view>
					<view class="popup_3">
						<view class="popup3_1">
							选择数量
						</view>
						<view class="popup3_2">
							<view class="popup3_1">
								<text @click="jian">-</text>
								<text>{{num}}</text>
								<text @click="jia">+</text>
							</view>
						</view>
					</view>
					<view class="popup_3">
						<view class="popup3_1">
							邮寄地址
						</view>
						<view class="right">
							<view class="right1">
								<view class="right1_1">
									<image src="https://s4.ax1x.com/2022/01/27/7XC08x.png" />
									<text>河南省郑州市</text>
								</view>
								<view class="right1_2">
									龙柏路论观海路金成中心四单元88楼西户
								</view>
							</view>
						</view>
						<image class="lright" src="@/static/img/ycfh.png" mode=""></image>
					</view>
				</view>


				<!--foot-->
				<view class="foot_1">
					<view class="xian">
					</view>
					<view class="foot_1_2">
						<text> 共计{{num*1000}}积分</text>
						<text @click="dsuccess">兑换</text>
					</view>
				</view>
				<!-- 取消 -->
				<view class="foot_2" @click="(show=false,type=false)">
					<image src="https://s4.ax1x.com/2022/01/26/7LMmAf.png" />
				</view>
			</view>
		</u-popup>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				show: false,
				num: 1
			}
		},
		methods: {
			jia() {
				this.num++
			},
			jian() {
				if (this.num <= 1) {
					this.$toast('数量不能小于1', 0)
					return
				}
				this.num--
			},
			dsuccess() {
				uni.navigateTo({
					url: `../../play/shoppingPlaysuccess?type=${'积分'}`
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.popup {
		position: relative;
		height: 766rpx;
		background-color: white;


		.foot_1 {
			position: absolute;
			bottom: 0;
			height: 140rpx;
			width: 100%;

			.foot_1_2 {
				padding-right: 30rpx;
			}

			.xian {
				margin-bottom: 20rpx;
				height: 25rpx;
				background-color: #F6F6F6;
			}

			text-align: right;
			background: #FFFFFF;
			opacity: 1;
			border-radius: 0px;

			text:nth-of-type(2) {
				display: inline-block;
				width: 300rpx;
				height: 88rpx;
				text-align: center;
				line-height: 88rpx;
				border-radius: 100rpx;
				background-color: rgb(255, 213, 0);
			}

			text:nth-of-type(1) {
				display: inline-block;
				font-size: 32rpx;
				font-family: Source Han Sans CN;
				font-weight: 600;
				margin-right: 20rpx;
				color: #131314;
				opacity: 1;
			}
		}

		.foot_2 {
			position: absolute;
			top: 30rpx;
			right: 30rpx;

			image {
				width: 50rpx;
				height: 54rpx;
			}
		}

		.popup_1 {
			text-align: center;
			font-size: 35rpx;
			font-family: Source Han Sans CN;
			font-weight: bold;
			color: #131314;
			opacity: 1;
		}

		.popup_3 {
			display: flex;
			align-items: center;
			justify-content: space-between;

			.lright {
				width: 38rpx;
				height: 38rpx;
			}

			.right {
				width: 75%;
				padding: 30rpx 0 30rpx 10rpx;

				.right1 {
					.right1_2 {
						font-size: 24rpx;
						margin-top: 10rpx;
						font-family: Source Han Sans CN;
						font-weight: 400;
						color: #91969A;
						opacity: 1;
					}

					.right1_1 {
						display: flex;
						align-items: center;

						image {
							width: 24rpx;
							height: 28rpx;
						}

						text {
							margin-left: 10rpx;
							font-size: 28rpx;
							font-family: Source Han Sans CN;
							font-weight: 400;
							color: #131314;
							opacity: 1;
						}
					}
				}
			}

			.popup3_1 {
				font-size: 28rpx;
				font-family: Source Han Sans CN;
				font-weight: bold;
				color: #131314;
				opacity: 1;
			}

			.popup3_2 {
				text-align: right;
				width: 80%;
				border-bottom: 1rpx solid #E3E3E3;
				padding: 30rpx 0 30rpx 0;

				.popup3_1 {
					text:nth-of-type(2) {
						font-size: 28rpx;
						font-family: HarmonyOS Sans;
						font-weight: bold;
						color: #131314;
						margin: 0 20rpx 0 20rpx;
						opacity: 1;
					}

					text:nth-of-type(3) {
						display: inline-block;
						width: 44rpx;
						height: 44rpx;
						line-height: 44rpx;
						text-align: center;
						border-radius: 100%;
						background-color: rgb(245, 245, 245);
					}

					text:nth-of-type(1) {
						display: inline-block;
						width: 44rpx;
						height: 44rpx;
						line-height: 44rpx;
						text-align: center;
						border-radius: 100%;
						background-color: rgb(245, 245, 245);
					}
				}
			}
		}

		.popup_2 {
			margin-top: 40rpx;
			display: flex;
			align-items: center;
			justify-content: space-between;

			.popup2_1 {
				font-size: 28rpx;
				font-family: Source Han Sans CN;
				font-weight: bold;
				color: #131314;
				opacity: 1;
			}

			.popup2_2 {
				display: flex;
				width: 80%;
				border-bottom: 1rpx solid #E3E3E3;
				padding: 20rpx 0 20rpx 0;

				.popup2_4 {
					margin-left: 40rpx;

					.popup2_4_2 {
						display: flex;
						margin-top: 15rpx;
						align-items: center;
					}

					image {
						width: 40rpx;
						height: 40rpx;
					}

					text {
						font-size: 24rpx;
						font-family: HarmonyOS Sans;
						font-weight: 500;
						color: #F1A637;
						margin-left: 10rpx;
						opacity: 1;
					}
				}

				.popup2_3 {
					image {
						width: 90rpx;
						height: 90rpx;
					}
				}
			}
		}
	}

	.all {
		.xq {
			.xq_1 {
				margin: 30rpx 0 30rpx 30rpx;
			}

			.img {
				position: relative;
				height: 4401rpx;
				min-height: 4000rpx;
				background-size: 100% 100%;
				background-repeat: no-repeat;
			}

			.button {
				position: fixed;
				bottom: 20rpx;
				width: 300rpx;
				height: 88rpx;
				background-color: rgb(255, 213, 0);
				text-align: center;
				line-height: 88rpx;
				border-radius: 100rpx;
				color: rgb(114, 65, 0);
				left: 50%;
				margin-left: -150rpx;
			}
		}

		.jiange {
			height: 25rpx;
			background-color: #F6F6F6;
		}

		.ziliao {
			padding: 30rpx;

			.ziliao_1 {
				font-size: 32rpx;
				font-family: Source Han Sans CN;
				font-weight: 500;
				color: #131314;
				opacity: 1;
			}

			.ziliao_2 {
				margin-top: 30rpx;
				display: flex;
				justify-content: space-between;

				.ziliao_2_2 {
					position: relative;
					top: 10rpx;
					font-size: 24rpx;
					font-family: Source Han Sans CN;
					font-weight: 400;
					color: #141414;
					opacity: 1;
				}

				.ziliao_2_1 {
					display: flex;
					align-items: center;

					text {
						font-size: 24rpx;
						font-family: HarmonyOS Sans;
						font-weight: 500;
						color: #F1A637;
						margin-left: 10rpx;
						opacity: 1;
					}

					image {
						width: 40rpx;
						height: 40rpx;
					}
				}
			}
		}

		.top {
			padding: 20rpx;
			background-size: 100% 100%;
			background-repeat: no-repeat;
			height: 328rpx;

		}
	}
</style>
